class zhongxin:
    def __init__(self,a):
        self.a=a;
    def solution(self):
        nums=[];
        for i in self.a.split(","):
            nums.append(int(i));
        nums1=[];
        for i in range(0,len(nums)-1):
            b=0;c=0
            for j in range(0,i):
                b = b + nums[j];
            for k in  range(i+1,len(nums)):
                c=c+nums[k];
            if(b==c):
                nums1.append(i);
        if(nums1):
            sorted(nums1);
            print(nums1[0]);
        else:
            print("-package9");

if __name__ == '__main__':
    a=zhongxin(input("输入一串数字"));
    a.solution();



